/*
* @Author: pao
* @Date:   2017-01-01 20:42:56
* @Last Modified by:   pao
* @Last Modified time: 2017-01-05 11:45:16
*/

'use strict';

const express=require('express');

//引入控制器模块
const videoCtrl=require('../controller/videoCtrl.js');

const videoListRoute=express.Router();


//定义路由
videoListRoute.get('/list',videoCtrl.getVideoListPage);

//新增页面的路由
videoListRoute.get('/add',videoCtrl.getAddPage);

videoListRoute.post('/add',videoCtrl.add);

videoListRoute.get('/edit/:vid',videoCtrl.getEditPage);

videoListRoute.post('/edit/:vid',videoCtrl.saveEdit); 

videoListRoute.get('/del/:vid',videoCtrl.delVideo)

module.exports=videoListRoute;

